package com.zcm.service;

import java.util.List;

import com.zcm.dao.CommodityDao;
import com.zcm.entity.commodity;
import com.zcm.entity.shopping_cart;
import com.zcm.entity.u_order;

public class CommodityService {
	CommodityDao CommodityDao = new CommodityDao();

	public List<commodity> SelectCommodity(String SelectText) {
		return CommodityDao.SelectCommodity(SelectText);
	}

	public int AddOrder(u_order c) {
		return CommodityDao.AddOrder(c);
	}

	public int DeleteShopping_cart(int comid,int userid) {
		return CommodityDao.DeleteShopping_cart(comid,userid);
	}


	public List<commodity> SelectAllcommodity() {
		return CommodityDao.SelectAllcommodity();
	}

	public List<commodity> SelectUserShoppingCart(Integer userid) {
		return CommodityDao.SelectUserShoppingCart(userid);
	}

	public boolean AddShopping_Cart(shopping_cart sc) {
		return CommodityDao.AddShopping_Cart(sc);
	}

	public commodity SelectCommodityByComid(int comid) {
		return CommodityDao.SelectCommodityByComid(comid);
	}

	public int shopping_cartIsExist(int comid, int userid) {
		return CommodityDao.shopping_cartIsExist(comid, userid);
	}
}
